home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / gnu / libmat.lha / src / meq.cc < prev    next >
C/C++ Source or Header  |  1980-01-01  |  392b  |  19 lines

  1. //                MATRIX LIB
  2. //            TOMMY JOHANSSON 1995
  3.  
  4. #include "matrix.h"
  5. int Matrix::operator == (const Matrix& A)
  6. {
  7.     int i,j,ch=1;
  8.     #ifdef DEBUG
  9.     printf("Jämför matriser.\n");
  10.     #endif
  11.     #ifdef CHECK
  12.     if((A.n!=n)||(m!=A.m))
  13.         printf("Felaktiga Dimensioner.%d<>%d eller %d<>%d.",A.n,n,A.m,m);
  14.     #endif
  15.     for(i=1;i<=A.m;i++)
  16.         for(j=1;j<=A.n;j++)
  17.             ch*=fabs(A.koff[i][j]-koff[i][j])<EPS;
  18.     return(ch==1);
  19. }